<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			function a(arr){
			sum=0;//4
			for(var i=0;i<arr.length;i++){
				sum+=arr[i];//sum = sum + arr[i]
			}
			return sum;	
		}
		
		var arr=[1,3,4,5];
		document.write(a(arr));
		</script>
		
	</head>
	<body>
	</body>
</html>
